
<link rel="stylesheet" href="../../css/pendingorder.css">
<!--<link rel="stylesheet" href="../../css/comfirmorder.css">-->
<% Date.prototype.Format = function (fmt) { //author: meizz
    var o = {
        "M+": this.getMonth() + 1,                 //月份
        "d+": this.getDate(),                    //日
        "h+": this.getHours(),                   //小时
        "m+": this.getMinutes(),                 //分
        "s+": this.getSeconds(),                 //秒
        "q+": Math.floor((this.getMonth() + 3) / 3), //季度
        "S": this.getMilliseconds()             //毫秒
    };
    if (/(y+)/.test(fmt))
        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o)
        if (new RegExp("(" + k + ")").test(fmt))
            fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
}
%>

<div class="body">
    <ul>
        <%var amounts=0;num=0;for(var i=0;i<data.length;i++){%>
        <li>
            <div class="goods-img">
                <img src="<%=data[i].goodimg%>" width="100%">
            </div>
            <div class="goods-desc">
                <p class="desc-name"><%=data[i].name%></p>
                <p class="desc-type"> <span><%=new Date(data[i].starttime).Format('MM.dd')%>-<%=new Date(data[i].endtime).Format('MM.dd')%></span></p>
            </div>
            <div class="goods-price">
                <p class="price">￥<%=data[i].price%></p>
                <p class="num"><span>x<%=data[i].count%></span></p>
            </div>
            <span style="display: none"><%= amounts+=(parseFloat(data[i].price).toFixed(2))*parseInt(data[i].count)%></span>
            <span style="display: none"><%= num+=parseInt(data[i].count)%></span>
        </li>
        <%}%>
        <div class="statistics">
            <p>共<span class="nums"><%=num%></span>个商品 合计：<span>￥</span><span class="total"><%=amounts%></span></p>
        </div>
    </ul>
    <div class="balance">
        <div class="foot-left">
            <p class="haspay2">
                <span>总价:</span><span class="strong">￥</span><span class="strong"><%=amounts%></span> <span>已付:</span><span class="strong">￥</span><span class="strong"><%=amounts*0.1%></span>
                <span>结算</span>
                <input type="text" id="payment" placeholder="请输入尾款">
            </p>
        </div>
        <div class="foot-right2" onclick="PENDORDER.accounts('<%=data[0].userid%>','<%=data[0].payid%>')">结算</div>
    </div>
    <div class="backcolor">
    </div>

    <div id="reservemenu" class="reservemenu">
        <div class="confont">
            <div id="closepay" class="closepay">
                <img src="images/close.png" alt="">
            </div>
            <p>确认付款</p>
        </div>
        <p class="payprice"><span>￥</span><span id="money"></span></p>
        <div>

    <div class="bottom" style="width: 100%;height: 60px;"></div>
</div>


<script>
    $(".backcolor").click(function (event) {
        $("#reservemenu").hide();
        $(".backcolor").hide();
    });
    $("#closepay").click(function (event) {
        $("#reservemenu").hide();
        $(".backcolor").hide();
        $("#bar").css("display",'block');
    });
</script>